import request from '../utils/request';

export function selectGoods(startpage,pagesize){
    return request({
        url: '/hs/carGoods/selectGoodsManage',
        method: 'get',
        params: {
            startpage: startpage,
            pagesize: pagesize
        }
    })
}

export function recommend(id){
    return request({
        url: `/hs/carGoods/recommend/${id}`,
        method: 'get'
    })
}


export function disRecommend(id){
    return request({
        url: `/hs/carGoods/disRecommend/${id}`,
        method: 'get'
    })
}

export function selectGoodsStyle(){
    return request({
        url: '/hs/carGoodsStyle/selectGoodsStyle',
        method: 'get'
    })
}

export function selectMH(formInline){
    return request({
        url: '/hs/carGoods/selctGoods',
        method: 'post',
        data: formInline
    })
}

export function selctStore(){
    return request({
        url: '/ses/mdStore/selectAllstores',
        method: 'get'
    })
}

export function selectRecommend(){
    return request({
        url:'/hs/carGoodsRecommend/selectRecommend',
        method: 'get'
    })
}

export function inserGoods(carGoods){
    return request({
        url:'/hs/carGoods/insertGoods',
        method: 'post',
        data: carGoods
    })
}

export function updateGoods(carGoods){
    return request({
        url: '/hs/carGoods/updateGoods',
        method: 'post',
        data: carGoods
    })
}

export function deleteGoods(id){
    return request({
        url: `/hs/carGoods/deleteGoods/${id}`,
        method: 'get'
    })
}